3.7.34 \(\int \frac {x (A+B x)}{\sqrt {a^2+2 a b x+b^2 x^2}} \, dx\)

Optimal. Leaf size=120 \[ \frac {x (a+b x) (A b-a B)}{b^2 \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {a (a+b x) (A b-a B) \log (a+b x)}{b^3 \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {B x^2 (a+b x)}{2 b \sqrt {a^2+2 a b x+b^2 x^2}} \]

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 120, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {770, 77} \begin {gather*} \frac {x (a+b x) (A b-a B)}{b^2 \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {a (a+b x) (A b-a B) \log (a+b x)}{b^3 \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {B x^2 (a+b x)}{2 b \sqrt {a^2+2 a b x+b^2 x^2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x*(A + B*x))/Sqrt[a^2 + 2*a*b*x + b^2*x^2],x]

[Out]

((A*b - a*B)*x*(a + b*x))/(b^2*Sqrt[a^2 + 2*a*b*x + b^2*x^2]) + (B*x^2*(a + b*x))/(2*b*Sqrt[a^2 + 2*a*b*x + b^
2*x^2]) - (a*(A*b - a*B)*(a + b*x)*Log[a + b*x])/(b^3*Sqrt[a^2 + 2*a*b*x + b^2*x^2])

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 770

Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dis
t[(a + b*x + c*x^2)^FracPart[p]/(c^IntPart[p]*(b/2 + c*x)^(2*FracPart[p])), Int[(d + e*x)^m*(f + g*x)*(b/2 + c
*x)^(2*p), x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && EqQ[b^2 - 4*a*c, 0]

Rubi steps

\begin {align*} \int \frac {x (A+B x)}{\sqrt {a^2+2 a b x+b^2 x^2}} \, dx &=\frac {\left (a b+b^2 x\right ) \int \frac {x (A+B x)}{a b+b^2 x} \, dx}{\sqrt {a^2+2 a b x+b^2 x^2}}\\ &=\frac {\left (a b+b^2 x\right ) \int \left (\frac {A b-a B}{b^3}+\frac {B x}{b^2}+\frac {a (-A b+a B)}{b^3 (a+b x)}\right ) \, dx}{\sqrt {a^2+2 a b x+b^2 x^2}}\\ &=\frac {(A b-a B) x (a+b x)}{b^2 \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {B x^2 (a+b x)}{2 b \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {a (A b-a B) (a+b x) \log (a+b x)}{b^3 \sqrt {a^2+2 a b x+b^2 x^2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 57, normalized size = 0.48 \begin {gather*} \frac {(a+b x) (b x (-2 a B+2 A b+b B x)+2 a (a B-A b) \log (a+b x))}{2 b^3 \sqrt {(a+b x)^2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x*(A + B*x))/Sqrt[a^2 + 2*a*b*x + b^2*x^2],x]

[Out]

((a + b*x)*(b*x*(2*A*b - 2*a*B + b*B*x) + 2*a*(-(A*b) + a*B)*Log[a + b*x]))/(2*b^3*Sqrt[(a + b*x)^2])

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.46, size = 231, normalized size = 1.92 \begin {gather*} \frac {\left (-a^2 \sqrt {b^2} B+a^2 (-b) B+a A b^2+a A b \sqrt {b^2}\right ) \log \left (\sqrt {a^2+2 a b x+b^2 x^2}-a-\sqrt {b^2} x\right )}{2 b^4}+\frac {\left (-a^2 \sqrt {b^2} B+a^2 b B-a A b^2+a A b \sqrt {b^2}\right ) \log \left (\sqrt {a^2+2 a b x+b^2 x^2}+a-\sqrt {b^2} x\right )}{2 b^4}+\frac {\sqrt {a^2+2 a b x+b^2 x^2} (-3 a B+2 A b+b B x)}{4 b^3}+\frac {2 a B x-2 A b x-b B x^2}{4 b \sqrt {b^2}} \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[(x*(A + B*x))/Sqrt[a^2 + 2*a*b*x + b^2*x^2],x]

[Out]

((2*A*b - 3*a*B + b*B*x)*Sqrt[a^2 + 2*a*b*x + b^2*x^2])/(4*b^3) + (-2*A*b*x + 2*a*B*x - b*B*x^2)/(4*b*Sqrt[b^2
]) + ((a*A*b^2 + a*A*b*Sqrt[b^2] - a^2*b*B - a^2*Sqrt[b^2]*B)*Log[-a - Sqrt[b^2]*x + Sqrt[a^2 + 2*a*b*x + b^2*
x^2]])/(2*b^4) + ((-(a*A*b^2) + a*A*b*Sqrt[b^2] + a^2*b*B - a^2*Sqrt[b^2]*B)*Log[a - Sqrt[b^2]*x + Sqrt[a^2 +
2*a*b*x + b^2*x^2]])/(2*b^4)

________________________________________________________________________________________

fricas [A]  time = 0.39, size = 47, normalized size = 0.39 \begin {gather*} \frac {B b^{2} x^{2} - 2 \, {\left (B a b - A b^{2}\right )} x + 2 \, {\left (B a^{2} - A a b\right )} \log \left (b x + a\right )}{2 \, b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(B*x+A)/((b*x+a)^2)^(1/2),x, algorithm="fricas")

[Out]

1/2*(B*b^2*x^2 - 2*(B*a*b - A*b^2)*x + 2*(B*a^2 - A*a*b)*log(b*x + a))/b^3

________________________________________________________________________________________

giac [A]  time = 0.15, size = 75, normalized size = 0.62 \begin {gather*} \frac {B b x^{2} \mathrm {sgn}\left (b x + a\right ) - 2 \, B a x \mathrm {sgn}\left (b x + a\right ) + 2 \, A b x \mathrm {sgn}\left (b x + a\right )}{2 \, b^{2}} + \frac {{\left (B a^{2} \mathrm {sgn}\left (b x + a\right ) - A a b \mathrm {sgn}\left (b x + a\right )\right )} \log \left ({\left | b x + a \right |}\right )}{b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(B*x+A)/((b*x+a)^2)^(1/2),x, algorithm="giac")

[Out]

1/2*(B*b*x^2*sgn(b*x + a) - 2*B*a*x*sgn(b*x + a) + 2*A*b*x*sgn(b*x + a))/b^2 + (B*a^2*sgn(b*x + a) - A*a*b*sgn
(b*x + a))*log(abs(b*x + a))/b^3

________________________________________________________________________________________

maple [A]  time = 0.05, size = 66, normalized size = 0.55 \begin {gather*} -\frac {\left (b x +a \right ) \left (-B \,b^{2} x^{2}+2 A a b \ln \left (b x +a \right )-2 A \,b^{2} x -2 B \,a^{2} \ln \left (b x +a \right )+2 B a b x \right )}{2 \sqrt {\left (b x +a \right )^{2}}\, b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(B*x+A)/((b*x+a)^2)^(1/2),x)

[Out]

-1/2*(b*x+a)*(-B*b^2*x^2+2*A*ln(b*x+a)*a*b-2*A*b^2*x-2*B*ln(b*x+a)*a^2+2*B*a*b*x)/((b*x+a)^2)^(1/2)/b^3

________________________________________________________________________________________

maxima [A]  time = 0.76, size = 72, normalized size = 0.60 \begin {gather*} \frac {B x^{2}}{2 \, b} - \frac {B a x}{b^{2}} + \frac {B a^{2} \log \left (x + \frac {a}{b}\right )}{b^{3}} - \frac {A a \log \left (x + \frac {a}{b}\right )}{b^{2}} + \frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} A}{b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(B*x+A)/((b*x+a)^2)^(1/2),x, algorithm="maxima")

[Out]

1/2*B*x^2/b - B*a*x/b^2 + B*a^2*log(x + a/b)/b^3 - A*a*log(x + a/b)/b^2 + sqrt(b^2*x^2 + 2*a*b*x + a^2)*A/b^2

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {x\,\left (A+B\,x\right )}{\sqrt {{\left (a+b\,x\right )}^2}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*(A + B*x))/((a + b*x)^2)^(1/2),x)

[Out]

int((x*(A + B*x))/((a + b*x)^2)^(1/2), x)

________________________________________________________________________________________

sympy [A]  time = 0.21, size = 37, normalized size = 0.31 \begin {gather*} \frac {B x^{2}}{2 b} + \frac {a \left (- A b + B a\right ) \log {\left (a + b x \right )}}{b^{3}} + x \left (\frac {A}{b} - \frac {B a}{b^{2}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(B*x+A)/((b*x+a)**2)**(1/2),x)

[Out]

B*x**2/(2*b) + a*(-A*b + B*a)*log(a + b*x)/b**3 + x*(A/b - B*a/b**2)

________________________________________________________________________________________